{*
* @author    ELEGANTAL <info@elegantal.com>
* @copyright (c) 2025, ELEGANTAL <www.elegantal.com>
* @license   Proprietary License - It is forbidden to resell or redistribute copies of the module or modified copies of the module.
*}
<div class="elegantalBootstrapWrapper">
    <div class="panel">
        <div class="panel-heading">
            <i class="icon-time"></i> {l s='Setup CRON job for export rule' mod='elegantaleasyimport'} "{$model.name|escape:'html':'UTF-8'}"
        </div>
        <div class="panel-body">
            <p>{l s='You can use CRON to automatically export products and combinations on scheduled time periods.' mod='elegantaleasyimport'}</p>
            <p>{l s='You will need to create a crontab for the following URL on your hosting server' mod='elegantaleasyimport'}: </p>
            <div class="alert alert-info alert_with_link_icon">
                <a href="{$cron_url|escape:'html':'UTF-8'}" target="_blank" style="color:#363a41">{$cron_url|escape:'html':'UTF-8'}</a>
            </div>
            <br>
            <p>{l s='The following are sample commands using different tools. You need to copy the one that suits your needs and setup CRON in your server.' mod='elegantaleasyimport'}</p>
            <!-- Tabs -->
            <ul class="nav nav-tabs">
                <li class="nav-item active"><a class="nav-link active" id="curl_tab_nav" data-toggle="tab" href="#curl_tab_content" role="tab" aria-controls="curl_tab_content" aria-selected="true">CURL</a></li>
                <li class="nav-item"><a class="nav-link" id="php_tab_nav" data-toggle="tab" href="#php_tab_content" role="tab" aria-controls="php_tab_content" aria-selected="false">PHP</a></li>
                <li class="nav-item"><a class="nav-link" id="wget_tab_nav" data-toggle="tab" href="#wget_tab_content" role="tab" aria-controls="wget_tab_content" aria-selected="false">WGET</a></li>
            </ul>
            <!-- Tab content -->
            <div class="tab-content">
                <div class="tab-pane active" id="curl_tab_content" role="tabpanel" aria-labelledby="curl_tab_nav">
                    <div class="well">curl "{$cron_url|escape:'html':'UTF-8'}" >/dev/null 2>&1</div>
                </div>
                <div class="tab-pane" id="php_tab_content" role="tabpanel" aria-labelledby="php_tab_nav">
                    <div class="well">/usr/bin/php {$cron_command|escape:'html':'UTF-8'}</div>
                </div>
                <div class="tab-pane" id="wget_tab_content" role="tabpanel" aria-labelledby="wget_tab_nav">
                    <div class="well">wget -q -O /dev/null "{$cron_url|escape:'html':'UTF-8'}"</div>
                </div>
            </div>
            <br>
            <p>{l s='The following is an example crontab which runs every hour' mod='elegantaleasyimport'}:</p>
            <div class="well">0 * * * * curl "{$cron_url|escape:'html':'UTF-8'}" >/dev/null 2>&1</div>
            <p>
                {l s='Learn more about CRON' mod='elegantaleasyimport'}: <br>
                <a href="https://en.wikipedia.org/wiki/Cron" target="_blank">https://en.wikipedia.org/wiki/Cron</a>
            </p>
            {if $cron_cpanel_doc}
                <p>
                    {l s='Learn how to setup CRON Job in cPanel' mod='elegantaleasyimport'}: <br>
                    <a href="{$cron_cpanel_doc|escape:'html':'UTF-8'}" target="_blank">
                        {l s='User guide on how to setup CRON Job in cPanel' mod='elegantaleasyimport'}
                    </a>
                </p>
            {/if}
            <p>
                {l s='If you do not know how to setup CRON Job on your server, there is another easy way to do this.' mod='elegantaleasyimport'}
                <br>
                {l s='You do not even need to open your cPanel or server. Just use any free or paid online CRON services, for example:' mod='elegantaleasyimport'}
                <a href="https://cron-job.org" target="_blank">https://cron-job.org</a>
                <br>
                {l s='You will select time and put command above (curl "http://....") and this online tool will take care of automatic execution of module.' mod='elegantaleasyimport'}
            </p>
        </div>
        <div class="panel-footer">
            <a href="{$adminUrl|escape:'html':'UTF-8'}&event=exportList" class="btn btn-default">
                <i class="process-icon-back"></i> {l s='Back' mod='elegantaleasyimport'}
            </a>
        </div>
    </div>
</div>